package com.psnoted.backend.exception;

/**
 * 数据库异常类
 * 当数据库操作失败时抛出此异常
 * 
 * @author PSNoted Team
 * @version 1.0.0
 */
public class DatabaseException extends BusinessException {

    public DatabaseException(String message) {
        super(500, message);
    }

    public DatabaseException(String operation, String reason) {
        super(500, "数据库操作失败: " + operation + " - " + reason);
    }

    public DatabaseException(String message, Throwable cause) {
        super(500, message, cause);
    }

    public DatabaseException(String operation, String reason, Throwable cause) {
        super(500, "数据库操作失败: " + operation + " - " + reason, cause);
    }
} 